package com.hzlx.plans.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hzlx.plans.mapper.MaintenancePlansMapper;
import com.hzlx.plans.domain.MaintenancePlans;
import com.hzlx.plans.service.IMaintenancePlansService;

/**
 * 设备保养计划Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
@Service
public class MaintenancePlansServiceImpl implements IMaintenancePlansService 
{
    @Autowired
    private MaintenancePlansMapper maintenancePlansMapper;

    /**
     * 查询设备保养计划
     * 
     * @param planId 设备保养计划主键
     * @return 设备保养计划
     */
    @Override
    public MaintenancePlans selectMaintenancePlansByPlanId(Integer planId)
    {
        return maintenancePlansMapper.selectMaintenancePlansByPlanId(planId);
    }

    /**
     * 查询设备保养计划列表
     * 
     * @param maintenancePlans 设备保养计划
     * @return 设备保养计划
     */
    @Override
    public List<MaintenancePlans> selectMaintenancePlansList(MaintenancePlans maintenancePlans)
    {
        return maintenancePlansMapper.selectMaintenancePlansList(maintenancePlans);
    }

    /**
     * 新增设备保养计划
     * 
     * @param maintenancePlans 设备保养计划
     * @return 结果
     */
    @Override
    public int insertMaintenancePlans(MaintenancePlans maintenancePlans)
    {
        return maintenancePlansMapper.insertMaintenancePlans(maintenancePlans);
    }

    /**
     * 修改设备保养计划
     * 
     * @param maintenancePlans 设备保养计划
     * @return 结果
     */
    @Override
    public int updateMaintenancePlans(MaintenancePlans maintenancePlans)
    {
        return maintenancePlansMapper.updateMaintenancePlans(maintenancePlans);
    }

    /**
     * 批量删除设备保养计划
     * 
     * @param planIds 需要删除的设备保养计划主键
     * @return 结果
     */
    @Override
    public int deleteMaintenancePlansByPlanIds(Integer[] planIds)
    {
        return maintenancePlansMapper.deleteMaintenancePlansByPlanIds(planIds);
    }

    /**
     * 删除设备保养计划信息
     * 
     * @param planId 设备保养计划主键
     * @return 结果
     */
    @Override
    public int deleteMaintenancePlansByPlanId(Integer planId)
    {
        return maintenancePlansMapper.deleteMaintenancePlansByPlanId(planId);
    }
}
